<?php

class Core_Form_Admincp_Storage_S3 extends Nuo_Form
{
	function init()
	{
		$this -> setTitle('Amazon S3 Storage System');

		$this -> setDesc('form-desc.Amazon S3 Storage System');

		$this -> addChild('text', 'access_key', array(
			'label' => 'Amazon S3 Access Key',
			'desc' => 'form-desc.Amazon S3 Access Key',
		));

		$this -> addChild('text', 'secket_key', array(
			'label' => 'Amazon S3 Secret Key',
			'desc' => 'form-desc.Amazon S3 Secret Key',
		));

		$this -> addChild('select', 'region', array(
			'label' => 'S3 Storage Region',
			'multiOptions' => array(
				'us-west-1' => 'United States (West)',
				'us-east-1' => 'United States (East)',
				'eu-west-1' => 'Europe (Ireland)',
				'ap-southeast-1' => 'Asia Pacific (Singapore)',
				'ap-northeast-1' => 'Asia Pacific (Japan)',
			),
			'desc' => 'form-desc.S3 Storage Region',
		));

		$this -> addChild('text', 'bucket', array(
			'label' => 'Amazon S3 Bucket',
			'desc' => 'form-desc.Amazon S3 Bucket',
		));

		$this -> addChild('text', 'basePath', array(
			'label' => 'Amazon S3 Base Path',
			'desc' => 'form-desc.Amazon S3 Base Path'
		));

		$this -> addChild('text', 'front_domain', array(
			'label' => 'Amazon S3 CloundFront Domain',
			'desc' => 'form-desc.Amazon S3 CloundFront Domain',
		));

		$this -> addChild('text', 'timeout', array(
			'label' => 'Connection Timeout',
			'value' => 20,
			'desc' => 'form-desc.Amazon S3 Connection Timeout',
		));

		$this -> addChild('yesno', 'is_storable', array(
			'label' => 'Is Enabled',
			'desc' => 'form-desc.Amazon S3 Is Enabled',
		));

		$this -> addChild('yesno', 'is_default', array(
			'label' => 'Is Default',
			'desc' => 'form-desc.Amazon S3 Is Default',
		));

		$this -> addChild('group', '_footer');

		$this -> _footer -> addChild('submit', '_submit') -> addChild('cancel', '_cancel');

	}

}
